<?php
/**
 * Created by PhpStorm.
 * User: ysfl
 * Date: 16-2-28
 * Time: 上午5:31
 */

//名字空间
namespace app\admin\controllers;

use modules\admin\ClentsModule;

class   Clents extends Admin
{
    //客户列表
    function Clents_List()
    {
        //注册模块
        $ADMIN = new ClentsModule();

        //企业客户列表
        $this->data['Company_Query'] = $ADMIN->Clents_Company_Query();

        //企业客户未付款
        $this->data['Company_Unpaid'] = $ADMIN->Clents_Company_Unpaid();

        //会员客户列表
        $this->data['Vip_Query'] = $ADMIN->Clents_Vip_Query();

        //企业客户年度消费额
        $this->data['Clents_Company_Consumer_Sum'] = $ADMIN->Clents_Company_Consumer_Sum();

        //调用视图并发送数据给视图
        $this->display($this->data);
    }

    //添加企业客户
    function Clents_Company_Add()
    {
        //提交检测
        if ($this->is_post()) {

            //注册模块
            $ADMIN = new ClentsModule();

            $this->data['info'] = $ADMIN->Clents_Company_Add($_POST);
        }

        //调用视图并发送数据给视图
        $this->display($this->data);
    }
}